package service.java;

public class Convierte {

    public Convierte() {
    }

    public String aString(Double x) {
        String result = null;

        if (x != null) {
            result = String.valueOf(x);
        }


        return result;
    }

    public String aString(Integer x) {
        String result = null;

        if (x != null) {
            result = String.valueOf(x);
        }


        return result;
    }
    
    public Double aDouble (String s) {
        Double result = null;
        
        if (s != null) {
            try {
                result = Double.valueOf(s);
            } catch (NumberFormatException e) {
            }
        }
        
        return result;
    }
       
    
        public Integer aInteger (String s) {
        Integer result = null;
        
        if (s != null) {
            try {
                result = Integer.valueOf(s);
            } catch (NumberFormatException e) {
            }
        }
        
        return result;
    }
}
